package cn.gson.work.model.pojos;

import com.fasterxml.jackson.annotation.JsonFormat;
import oracle.sql.TIMESTAMP;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.sql.Time;
import java.sql.Timestamp;
import java.util.Objects;

@Entity
public class Huiyi {
	private long hid;
	private String hbm4;
	private String hzt;
	@JsonFormat(pattern = "yyyy-MM-dd")
	private Timestamp kdate;
	@JsonFormat(pattern = "yyyy-MM-dd")
	private Timestamp jdate;
	private String sname5;

	@Id
	@Column(name = "HID")
	public long getHid() {
		return hid;
	}

	public void setHid(long hid) {
		this.hid = hid;
	}

	@Basic
	@Column(name = "HBM4")
	public String getHbm4() {
		return hbm4;
	}

	public void setHbm4(String hbm4) {
		this.hbm4 = hbm4;
	}

	@Basic
	@Column(name = "HZT")
	public String getHzt() {
		return hzt;
	}

	public void setHzt(String hzt) {
		this.hzt = hzt;
	}

	@Basic
	@Column(name = "KDATE")
	public Timestamp getKdate() {
		return kdate;
	}

	public void setKdate(Timestamp kdate) {
		this.kdate = kdate;
	}

	@Basic
	@Column(name = "JDATE")
	public Timestamp getJdate() {
		return jdate;
	}

	public void setJdate(Timestamp jdate) {
		this.jdate = jdate;
	}

	@Basic
	@Column(name = "SNAME5")
	public String getSname5() {
		return sname5;
	}

	public void setSname5(String sname5) {
		this.sname5 = sname5;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) return true;
		if (o == null || getClass() != o.getClass()) return false;
		Huiyi huiyi = (Huiyi) o;
		return hid == huiyi.hid &&
				Objects.equals(hbm4, huiyi.hbm4) &&
				Objects.equals(hzt, huiyi.hzt) &&
				Objects.equals(kdate, huiyi.kdate) &&
				Objects.equals(jdate, huiyi.jdate) &&
				Objects.equals(sname5, huiyi.sname5);
	}

	@Override
	public int hashCode() {
		return Objects.hash(hid, hbm4, hzt, kdate, jdate, sname5);
	}
}
